var nrc = require('node-run-cmd');

// let cmds = [
//     {
//         command:'F:\\Projects\\Node\\electron-muhtar\\static\\ffmpeg\\bin\\ffmpeg.exe -y -i "C:\\Users\\ibo\\Desktop\\ff_test\\trim.mp4"  -vf "movie=F\\\\:/Projects/Node/electron-muhtar/static/sinzar_new.png, scale=163:51 [watermark]; [scale][watermark] overlay=60:50[out]"  -c:v h264 -profile:v high -sc_threshold 0 -pass 1 -an -f mp4  -pix_fmt yuv420p -map v:0 -map a:0 -preset slow -c:a aac -rc vbr -spatial_aq 1 -strict -2 -ac 2 -color_primaries 1 -color_trc 1 -colorspace 1 -b:a 128k -sn -b:v 500K -minrate 100K -maxrate 1250K -s 854x480 -passlogfile "C:\\Users\\ibo\\Desktop\\ff_test\\out\\1\\480p_mp4\\pass_temp" -y NUL -metadata -pid=ff123 ',
//         shell:false
//     },
//     {command:'del "C:\\Users\\ibo\\Desktop\\ff_test\\temp_temp.mp4',shell:true}
// ];


function onData(a,b,c){
    console.log("callback : ",a,b,c)
}

function onCompleteCmd(e){
    console.log("onCompleteCmd : ",e)
}

let res = nrc.run(cmds, {onData:onData,onError: onData, onDone: onCompleteCmd});
res.then(function (res) {
    console.log(res)
})
console.log(res)

